package com.ebuilder.util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DBUtil {
	private static SessionFactory sessionFactory;
	
		
	public static SessionFactory getSessionFactory() {
		try{
			sessionFactory = new Configuration().configure().buildSessionFactory();
		} catch (Throwable e) {
			// TODO: handle exception
			throw new ExceptionInInitializerError(e);
		}
		return sessionFactory;
	}
}
